    <!-- *** CUT top -->
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="metallic_grid_top_table" >
        <tr>
            <td>
                <div class="metallic_grid_title">Virtual pages</div>
            </td>
        </tr>
        <tr>
            <td class="metallic_paginator">
                <form action="admin/modules/tangra_cms/menu/item_types/vpage_select.php" method="get">
                <table border="0" cellspacing="0" cellpadding="4">
                    <tr>
                        <td valign="middle"><strong>Filter</strong>&nbsp;&nbsp;&nbsp;
                        </td>
                        <td>
                            <table border="0" cellspacing="0" cellpadding="4" align="left">
                                <tr>
                                    <td>Path like:</td>
                                    <td><input name="path" type="text" size="45" maxlength="255" value="{$path}"/>&nbsp;&nbsp;</td>
                                    <td align="right">Online? </td>
                                    <td>
                                    <select name="online" size="1">
                                        <option value="0" {if $online == 0}selected="selected"{/if}>All</option>
                                        <option value="1" {if $online == 1}selected="selected"{/if}>Online only</option>                            
                                        <option value="2" {if $online == 2}selected="selected"{/if}>Offline only</option>                                                    
                                    </select>
                                    </td>
                                    <td>&nbsp;</td>                                                                 
                                </tr>
                                <tr>
                                    <td>Template
                                    </td>                                                
                                    <td>
                                    <select name="template" size="1">
                                        {foreach from=$templates item=t}
                                        <option value="{$t.id}" {if $t.id == $template}selected="selected"{/if}>{$t.name}</option>
                                        {/foreach}
                                    </select>
                                    </td>           
                                    <td>&nbsp;&nbsp;System generated? </td>
                                    <td>
                                    <select name="sys_gen" size="1">
                                        <option value="0" {if $sys_gen == 0}selected="selected"{/if}>All</option>
                                        <option value="1" {if $sys_gen == 1}selected="selected"{/if}>System generated only</option>                            
                                        <option value="2" {if $sys_gen == 2}selected="selected"{/if}>Normal pages only</option>                                                    
                                    </select>
                                    </td>
                                    <td>&nbsp;</td>                                         
                                </tr>
                            </table>                        
                        </td>
                        <td valign="middle"><input name="submit_filter" type="submit" value="filter" /></td>
                    </tr>
                </table>
                </form>
            </td>
        </tr>    
       
        <tr>
            <td>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="metallic_paginator">
                    <tr>
                        <td width="34%"> {if $vpage_select_total_pages > 1}
                            <table border="0" cellspacing="0" cellpadding="2" class="metallic_pg_page_of_table">
                                <tr>
                                    <td valign="middle">{if $vpage_select_first_page}<a href="{$vpage_select_first_page}" onclick="submit_ajax_grid_vpage_select({$vpage_select_first_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_first_blue.png" alt="First page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_first.png" alt="First page" border="0" />{/if}</td>
                                    <td valign="middle">{if $vpage_select_prev_page}<a href="{$vpage_select_prev_page}" onclick="submit_ajax_grid_vpage_select({$vpage_select_prev_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_prev_blue.png" alt="Previous page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_prev.png" alt="Previous page" border="0" />{/if}</td>
                                    <td class="metallic_pg_page_of" valign="middle">{if $vpage_select_total_pages}Page {$vpage_select_current_page} of {$vpage_select_total_pages}{/if}</td>
                                    <td valign="middle">{if $vpage_select_next_page}<a href="{$vpage_select_next_page}" onclick="submit_ajax_grid_vpage_select({$vpage_select_next_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_next_blue.png" alt="Next page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_next.png" alt="Next page" border="0" />{/if}</td>
                                    <td valign="middle">{if $vpage_select_last_page}<a href="{$vpage_select_last_page}" onclick="submit_ajax_grid_vpage_select({$vpage_select_last_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_last_blue.png" alt="Last page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_last.png" alt="Last page" border="0" />{/if}</td>
                                </tr>
                            </table>
                            {/if} </td>
                        <td class="metallic_pg_jump_to_page" width="33%" align="center">{if $vpage_select_records_to} Records {$vpage_select_records_from}-{$vpage_select_records_to} of {$vpage_select_records_total}{/if}</td>
                        <td class="metallic_pg_records" width="33%" align="right"> {if $vpage_select_total_pages > 1}
                            <table border="0" cellspacing="2" cellpadding="0">
                                <tr>
                                    <td>Jump to page</td>
                                    <td>
                                        <form class="metallic_pg_page_select" action="{$vpage_select_jump_to_page_action}" method="get" enctype="application/x-www-form-urlencoded">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td>
                                                        <select name="vpage_select_grid_page" id="vpage_select_field_page" onchange="vpage_select_page_change(this.options[this.selectedIndex].value); return false;">
                                                            
															{foreach from=$vpage_select_jump_to_page_arr item=vpage_select_page_num}
															
                                                            <option value="{$vpage_select_page_num}"{if $vpage_select_page_num == $vpage_select_current_page} selected="selected"{/if}>{$vpage_select_page_num}</option>
                                                            
															{/foreach}
														
                                                        </select>
                                                    </td>
                                                    <td>
                                                        <noscript>
                                                        &nbsp;
                                                        <input name="submit" type="image" src="img/modules/grid_html_tpl_static_ajax_metallic/page_go.png" alt="go" />
                                                        </noscript>
                                                    </td>
                                                </tr>
                                            </table>
                                        </form>
                                    </td>
                                </tr>
                            </table>
                            {else}
                            &nbsp;
                            {/if} </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <table width="100%"  border="0" cellspacing="1" cellpadding="2" class="metallic_grid_table">
                    <thead>
                        <tr>
                            <th align="center" class="metallic_grid_header" nowrap="nowrap" width="5%">&nbsp;ID&nbsp;</th>
                            <th class="metallic_grid_header">&nbsp;</th>
                            <th class="metallic_grid_header">&nbsp;</th>
                            <th class="metallic_grid_header">&nbsp;</th>                            
                            <th class="metallic_grid_header">&nbsp;</th>                                                        
                            <th align="center" class="metallic_grid_header" nowrap="nowrap" width="65%">&nbsp;Path&nbsp;</th>
                            <th align="center" class="metallic_grid_header" nowrap="nowrap" width="25%">&nbsp;Template&nbsp;</th>
                            <th align="center" class="metallic_grid_header" nowrap="nowrap" width="5%">&nbsp;Online?&nbsp;</th>                            
                            <th class="metallic_grid_header">&nbsp;</th>
                            <th class="metallic_grid_header">&nbsp;</th>
                        </tr>
                    </thead>
                    <tbody>
                    
                    {foreach from=$vpage_select_prows item=row}
                    <tr class="metallic_grid_body" onmouseover="this.className='metallic_grid_body_over';return true;" onmouseout="this.className='metallic_grid_body';return true;">
                        <td align="right">{$row.cols.0}</td>
                        <td align="right" width="16">{if $row.cols.7 == 0}<img src="/img/modules/crystal_icons_small/16x16/led_green.png" alt="Filled" width="16" height="16" {popup text="OK"}/>{else}{if $row.cols.7 == 1}<img src="/img/modules/crystal_icons_small/16x16/led_yellow.png" alt="Not filled" width="16" height="16" {popup text="Some non mandatory attributes are not entered"} />{else}<img src="/img/modules/crystal_icons_small/16x16/led_red.png" alt="Mandatory attributes not entered" width="16" height="16" {popup text="Mandatory attributes not entered"} />{/if}{/if}</td>
                        <td align="right" width="16">{if $row.cols.4}<img src="/img/modules/tangra_cms/page_sys_generated.png" alt="System generated" {popup text="System generated page. Editing not advisable."} width="16" height="16" />{else}<img src="/img/modules/tangra_cms/page_human_generated.png" alt="System generated" {popup text="Normal page. You may edit it safely."} width="16" height="16" />{/if}</td>
                        <td align="right" width="16">{if $row.cols.3}<img src="/img/modules/tangra_cms/online_small.png" alt="Online" width="16" height="16" {popup text="Page is online"} />{else}<img src="/img/modules/tangra_cms/offline_small.png" alt="Offline" width="16" height="16" {popup text="Page is offline"} />{/if}</td>
						{assign var="tmp" value=$row.cols.6}
                        {assign var="sitemap_weight" value="`$tmp/10`"}
                        <td align="right" width="16">{if $row.cols.5}<img src="/img/modules/tangra_cms/sitemap_yes.png" alt="sitemap yes" width="16" height="16" {popup text="Will be included in sitemap. Sitemap weight: `$sitemap_weight`"} />{else}<img src="/img/modules/tangra_cms/sitemap_no.png" alt="sitemap no" width="16" height="16" {popup text="Don't include in sitemap"} />{/if}</td>
                        <td align="left"><a href="{$ret}&amp;select={$row.lc_vals.select}" {popup text="Click to select"}>{$row.cols.1}</a></td>
                        <td align="left">{$row.cols.2}</td>                        
                        <td align="center">{if $row.cols.3}<span class="status_ok">Yes</span>{else}<span class="status_error">No</span>{/if}</td>
                        <td align="center" width="1" class="metallic_grid_link"><a href="{$ret}&amp;select={$row.lc_vals.select}" class="action_select">Select</a></td>
                        <td align="center" width="1" class="metallic_grid_link"><a href="admin/modules/tangra_cms/vpage/vpage_manage.php?manage={$row.lc_vals.select}" {popup text="Click to manage in new window"} target="_blank" class="action_manage">Manage</a></td>                                                
                    </tr>
                    {foreachelse}
                    <tr class="metallic_grid_body">
                        <td colspan="9" align="left">No items</td>
                        <td>&nbsp;</td>
                    </tr>
                    {assign var="$vpage_select_prows_count"  value=1}
                    {/foreach}
				{math equation="$vpage_select_page_size - rc" rc=$vpage_select_prows_count assign=rc}
				{section name=aa loop=$rc}
				<tr class="metallic_grid_body">
                    <td colspan="9">&nbsp;</td>
										<td>&nbsp;</td>
									</tr>
				{/section}
                    </tbody>
                    
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <table width="100%" border="0" cellspacing="0" cellpadding="0" class="metallic_paginator">
                    <tr>
                        <td width="34%"> {if $vpage_select_total_pages > 1}
                            <table border="0" cellspacing="0" cellpadding="2" class="metallic_pg_page_of_table">
                                <tr>
                                    <td valign="middle">{if $vpage_select_first_page}<a href="{$vpage_select_first_page}" onclick="submit_ajax_grid_vpage_select({$vpage_select_first_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_first_blue.png" alt="First page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_first.png" alt="First page" border="0" />{/if}</td>
                                    <td valign="middle">{if $vpage_select_prev_page}<a href="{$vpage_select_prev_page}" onclick="submit_ajax_grid_vpage_select({$vpage_select_prev_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_prev_blue.png" alt="Previous page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_prev.png" alt="Previous page" border="0" />{/if}</td>
                                    <td class="metallic_pg_page_of" valign="middle">{if $vpage_select_total_pages}Page {$vpage_select_current_page} of {$vpage_select_total_pages}{/if}</td>
                                    <td valign="middle">{if $vpage_select_next_page}<a href="{$vpage_select_next_page}" onclick="submit_ajax_grid_vpage_select({$vpage_select_next_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_next_blue.png" alt="Next page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_next.png" alt="Next page" border="0" />{/if}</td>
                                    <td valign="middle">{if $vpage_select_last_page}<a href="{$vpage_select_last_page}" onclick="submit_ajax_grid_vpage_select({$vpage_select_last_page_num}); return false;"><img src="img/modules/grid_html_tpl_static_ajax_metallic/page_last_blue.png" alt="Last page" border="0" /></a>{else}<img src="img/modules/grid_html_tpl_static_ajax_metallic/page_last.png" alt="Last page" border="0" />{/if}</td>
                                </tr>
                            </table>
                            {/if} </td>
                        <td class="metallic_pg_jump_to_page" width="33%" align="center">{if $vpage_select_records_to} Records {$vpage_select_records_from}-{$vpage_select_records_to} of {$vpage_select_records_total}{/if}</td>
                        <td class="metallic_pg_records" width="33%" align="right"> {if $vpage_select_total_pages > 1}
                            <table border="0" cellspacing="2" cellpadding="0">
                                <tr>
                                    <td>Jump to page</td>
                                    <td>
                                        <form action="{$vpage_select_jump_to_page_action}" method="get" enctype="application/x-www-form-urlencoded">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td>
                                                        <select name="vpage_select_grid_page" id="vpage_select_field_page" onchange="vpage_select_page_change(this.options[this.selectedIndex].value); return false;">
                                                            
															{foreach from=$vpage_select_jump_to_page_arr item=vpage_select_page_num}
															
                                                            <option value="{$vpage_select_page_num}"{if $vpage_select_page_num == $vpage_select_current_page} selected="selected"{/if}>{$vpage_select_page_num}</option>
                                                            
															{/foreach}
														
                                                        </select>
                                                    </td>
                                                    <td>
                                                        <noscript>
                                                        &nbsp;
                                                        <input name="submit" type="image" src="img/modules/grid_html_tpl_static_ajax_metallic/page_go.png" alt="go" />
                                                        </noscript>
                                                    </td>
                                                </tr>
                                            </table>
                                        </form>
                                    </td>
                                </tr>
                            </table>
                            {else}
                            &nbsp;
                            {/if} </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <!-- *** CUT botton -->
